net: Remove variables hooks when interface is unregisted
authorB Horn <b@horn.uk>
Fri, 1 Nov 2024 23:49:48 +0000 (23:49 +0000)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commit74afbb0cdf694bc11873ef473e159677c8e0015b
treeb5cf8a627c9d9004356d751a1ed5dc71d3f8035e
parent9e2bb4defa511673aaa9ee0dd3a07fa6b535dd29
net: Remove variables hooks when interface is unregisted

The grub_net_network_level_interface_unregister(), previously
implemented in a header, did not remove the variables hooks that
were registered in grub_net_network_level_interface_register().
Fix this by implementing the same logic used to register the
variables and move the function into the grub-core/net/net.c.

Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Conflicts:
grub-core/net/net.c

Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name net-Remove-variables-hooks-when-interface-is-unregisted.patch
grub-core/net/net.c
include/grub/net.h